from django import forms

class LoginForm(forms.Form):
    """登录表单"""
    username = forms.CharField(
        max_length=50,
        widget=forms.TextInput(attrs={
            'class': 'form-control',
            'placeholder': '请输入学号',
            'required': True
        }),
        label='学号'
    )
    
    password = forms.CharField(
        widget=forms.PasswordInput(attrs={
            'class': 'form-control',
            'placeholder': '请输入密码',
            'required': True
        }),
        label='密码'
    )
    
    major_name = forms.CharField(
        max_length=100,
        widget=forms.TextInput(attrs={
            'class': 'form-control',
            'placeholder': '请输入专业名称',
            'required': True
        }),
        label='专业名称'
    )
